'''
Created on 2019年9月2日

@author: bkd
'''
from os import environ
from os.path import expanduser, join
import sys, time

from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QInputDialog

from .exception_handler import global_exception_hander
from .linuxWeixin_ui import Ui_MainWindow
from .login import login

class linuxWeixin(QMainWindow,Ui_MainWindow):

    def __init__(self):
        super().__init__()
        self.setupUi(self)

        self.exception_handler = global_exception_hander()
        self.exception_handler.patch_excepthook()

        self.last_dir = None
        
        self.login = login()
        self.login.show()
        self.hide()
   
    #             获取上一次打开的目录
    def get_last_dir(self):
        if self.last_dir:
            return self.last_dir
        else:
            return expanduser("~")

    @pyqtSlot()
    def on_action_start_all_port_triggered(self):
        print("g")

def main():
    app = QApplication(sys.argv)
    win = linuxWeixin()
#     win.show()
    sys.exit(app.exec_())
